package com.mocai.merchant.controller;

import com.mocai.merchant.mapper.UserMapper;
import com.mocai.merchant.model.User;
import com.mocai.merchant.service.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("admin/sys/user")
public class UserController extends BaseController<UserService, UserMapper, User, Integer> {

    @RequestMapping(value = "/by_username/{username}", method = RequestMethod.GET)
    @ResponseBody
    public Object updateByUsername(@PathVariable("username") String username) {
        return service.findByUsername(username);
    }

}
